package com.hl.util;

import lombok.Data;

@Data
public class R {
    private int code;
    private String message;
    private Object data;

    public static R success(Object data){
        R r = new R();
        r.setCode(200);
        r.setMessage("操作成功");
        r.setData(data);
        return r;
    }
    public static R fail(Object data){
        R r = new R();
        r.setCode(201);
        r.setMessage("操作失败");
        r.setData(data);
        return r;
    }

}
